import request from '@/utils/request'

export function page${entityName}(params) {
  return request({
    url: '/${table.name}',
    method: 'get',
    params
  })
}

export function get${entityName}(id) {
  return request({
    url: `/${table.name}/${r"${id}"}`,
    method: 'get'
  })
}

export function create${entityName}(data) {
  return request({
    url: '/${table.name}',
    method: 'post',
    data
  })
}

export function update${entityName}(id, data) {
  return request({
    url: `/${table.name}/${r"${id}"}`,
    method: 'put',
    data
  })
}

export function delete${entityName}(id) {
  return request({
    url: `/${table.name}/${r"${id}"}`,
    method: 'delete'
  })
}